package server;

import peer.tools.Mdb;

public class CleanTaskIdent {
	int sourceSessionId;
	Mdb mdb;
	int hashCode;
	CleanTaskIdent(Mdb mdb,int sourceSessionId){
		this.mdb=mdb;
		this.sourceSessionId=sourceSessionId;
		hashCode=(mdb.toString()+Integer.toString(sourceSessionId)).hashCode();
	}
	
	public boolean equals(Object ob){
		if(ob==null){
			return false;
		}else{
			CleanTaskIdent cti=(CleanTaskIdent)ob;
			return mdb.equals(cti.mdb)&sourceSessionId==cti.sourceSessionId;
		}
	}
	
	public int hashCode(){
		return hashCode;
	}
}
